package com.hspedu.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hspedu.seckill.entity.User;
import com.hspedu.seckill.model.result.RespBean;
import com.hspedu.seckill.model.vo.LoginVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface UserService extends IService<User> {

    //完成用户登录校验
    RespBean doLogin(LoginVo loginVo,
                     HttpServletRequest request,
                     HttpServletResponse response);

    //根据cookie 获取用户信息
    User getUserByCookie(String userTicket,
                         HttpServletRequest request,
                         HttpServletResponse response);

    //更新用户密码
    RespBean updatePassword(String userTicket, String password,
             HttpServletRequest request, HttpServletResponse response);
}
